﻿@model IEnumerable<vITs.Site.Models.DataModels.Account>
@using vITs.Site.Models.DataModels
@{
    ViewBag.Title = "Betalningskonton";
}
<h2>@this.ViewBag.Title</h2>
<p>
    @Html.ActionLink("Skapa Nytt", "CreateAccount")
</p>
<table class="data-list">
    <thead>
        <tr>
            <th>
                Kontonamn
            </th>
            <th>
                Utfärdat Av
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @item.Issuer.GetFullName()
            </td>
            <td>
                @Html.ActionLink("Redigera", "Edit", new { id=item.AccountId }) |
                @Html.ActionLink("Ta Bort", "Delete", new { id = item.AccountId }, new { onclick="javascript:return confirm('Är du säker?');" })
            </td>
        </tr>
}
    </tbody>
</table>
